[heft] feat: add new task-level timing metrics#5232
[heft] feat: add new task-level timing metrics#5232aramissennyeydd wants to merge 1 commit intomicrosoft:mainfrom
Conversation
| { | ||
| "$schema": "http://json.schemastore.org/tsconfig", | ||
|
|
||
| "compilerOptions": { |
There was a problem hiding this comment.
Pretty sure we have a rig we should be extending for this?
There was a problem hiding this comment.
@dmichon-msft Looking through a few other heft example plugins, I don't see anything - do you know which one that would be?
|
Realizing that I also want a edit: I think what I'd be looking for would be start + end hooks for heft phases, which I don't love adding as public API rn. Task-level metrics are a good start :) |
28a094e to
3dac4c8
Compare
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
3dac4c8 to
9b9fe3b
Compare
|
@dmichon-msft What do you think about instead implementing this as |
|
closing in favor of #5250 |
Summary
Adds task-level metrics for reporting on how long specific plugins take to execute, like the Typescript, Jest, and Webpack plugins. These are currently only logged out to console in verbose mode.
Details
I copied most of the existing implementation of the
recordMetricshook to create arecordTaskMetricshook - the idea here is being able to report on the specific amount of time that each task takes and add more granular reporting. Let me know what you think about the metric envelope.How it was tested
Added a test
heft-lifecycle-pluginthat logs out the time taken for each task (you can still see the verbose logs too). Example:Impacted documentation
Not sure?